<!DOCTYPE html>
<html lang="en">

<head>
    <title>变量的优先级</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="css/style.css" rel="stylesheet">
</head>

<body>
    <script language="JavaScript">
        let scope = "全局变量";
        function checkscope() {
            let scope = "局部变量";
            document.write(scope);
        }
        checkscope();
    </script>
</body>

</html>